package com.zmm.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

@SpringBootApplication
@EnableDiscoveryClient
public class App {
	public static void main(String[] args) {
		SpringApplication.run(App.class, args);
	}
	@Slf4j
	@RestController
	@RefreshScope
	static class TestController {

		@Value("${conifg.title:}")
		private String title;
		@GetMapping("/test")
		public String hello() {
			log.info(title);
			log.info("123");
			return title;
		}
	}
}
